import Vue from 'vue'
import VueRouter from 'vue-router'
import Home from '../../popup/home/index.vue'
import autoPwdManage from '../../popup/autoPwdManage/index.vue'
import googleAuth from '../../popup/googleAuth/index.vue'
import bookMark from '../../popup/bookMark/index.vue'

Vue.use(VueRouter)

const routes = [
  {
    path: '*',
    redirect: '/home',
  },
  {
    path: '/home',
    name: 'Home',
    meta: {
      title: '控制台',
    },
    component: Home,
  },
  {
    path: '/autoPwdManage',
    name: 'autoPwdManage',
    meta: {
      title: '密码填充管理',
    },
    component: autoPwdManage,
  },
  {
    path: '/googleAuth',
    name: 'googleAuth',
    meta: {
      title: 'google authentication 验证码生成器',
    },
    component: googleAuth,
  },
  {
    path: '/bookMark',
    name: 'bookMark',
    meta: {
      title: '浏览器收藏夹',
    },
    component: bookMark,
  },
]

const router = new VueRouter({
  mode: 'history',
  base: process.env.BASE_URL,
  routes,
})
export default router
